﻿#region Copyright
/// <copyright>
/// Copyright (c) 2008 Ilia Shramko.
/// Released under the terms of the GNU General Public License.
/// </copyright>
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace Osh.Dvb
{
	/// <summary>
	/// Describes element of a program from the transport stream.
	/// See ISO/IEC 13818-1 for more information.
	/// </summary>
	public class ProgramElementDefinition
	{
		private byte _streamType;
		private ushort _pid;
		private List<IDescriptor> _descriptors;

		public ProgramElementDefinition()
		{
		}

		/// <summary>
		/// Elementary stream type (table 2-36 in ISO/IEC 13818-1).
		/// </summary>
		public byte StreamType
		{
			get { return _streamType; }
			set { _streamType = value; }
		}

		public ushort Pid
		{
			get { return _pid; }
			set { _pid = value; }
		}

		public List<IDescriptor> Descriptors
		{
			get
			{
				if(_descriptors == null)
					_descriptors = new List<IDescriptor>();
				return _descriptors;
			}
			set { _descriptors = value; }
		}
	}
}
